//
//  FenLelDetailCell.m
//  XMLYFM
//
//  Created by dllo on 15/12/29.
//  Copyright © 2015年 zzl. All rights reserved.
//

#import "FenLelDetailCell.h"
#import <UIImageView+WebCache.h>

@implementation FenLelDetailCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}



-(void)setFenLeiModel:(ZTFavorModel *)fenLeiModel
{
    NSURL *imgUrl = [NSURL URLWithString:fenLeiModel.coverMiddle];
    [self.headImage sd_setImageWithURL:imgUrl placeholderImage:PLACEHOLDER_IMAGE];
   
    self.TitleLabel.text = fenLeiModel.title;
    self.MiaoSHU.text = fenLeiModel.lastUptrackTitle;
    self.Jishu.text = [NSString stringWithFormat:@"%@集",fenLeiModel.tracksCounts];

    
    
    CGFloat hear = fenLeiModel.playsCounts / 10000.0;
    
    NSInteger temp = fenLeiModel.playsCounts / 1000;
    NSInteger yu = temp % 10;
    
    //听
    if (fenLeiModel.playsCounts > 10000 ) {
        
        //        NSLog(@"🐴🐴🐴🐴🐴🐴🐴🐴🐴🐴🐴🐴%ld",yu);
        if (yu == 0) {
            self.playCount.text = [NSString stringWithFormat:@"%ld万",fenLeiModel.playsCounts / 10000];
        }
        else
        {
            
            self.playCount.text = [NSString stringWithFormat:@"%.1f万",hear];
        }
        
    }
    else
    {
        self.playCount.text = [NSString stringWithFormat:@"%ld",fenLeiModel.playsCounts];
        
        
    }


    self.MiaoSHU.textColor = [UIColor colorWithRed:0.72 green:0.72 blue:0.72 alpha:1];
    self.playCount.textColor = [UIColor colorWithRed:0.72 green:0.72 blue:0.72 alpha:1];
    self.Jishu.textColor = [UIColor colorWithRed:0.72 green:0.72 blue:0.72 alpha:1];
    self.jishuImg.image = [UIImage imageNamed:@"album_tracks@2x.png"];
    self.playImg.image = [UIImage imageNamed:@"findsection_logo@2x.png"];
    
}

//!!!!! 看这里 收藏按钮

- (IBAction)shouCangAction:(UIButton *)sender {
    
    NSLog(@"111");
    
}
@end
